uniform float size;
uniform float scale;
varying float opacity;
void main() {
  vec4 mPosition = modelMatrix * vec4(position, 1.0);
  vec4 mvPosition = viewMatrix * mPosition;
  vec4 mZeroPositon = modelMatrix * vec4(.0, .0, .0, 1.0);
  vec3 positionToZero = mPosition.xyz - mZeroPositon.xyz;
  vec3 vToEye = cameraPosition - mPosition.xyz;
  opacity = dot(vToEye, positionToZero);
  gl_PointSize = size * (scale / -mvPosition.z);
  gl_Position = projectionMatrix * mvPosition;
}